//
//  BottomView.m
//  zhuchiren
//
//  Created by rainday on 15/1/31.
//  Copyright (c) 2015年 rainday. All rights reserved.
//

#import "BottomView.h"
#import <RACEXTScope.h>
#import <ReactiveCocoa.h>
#import <QuartzCore/QuartzCore.h>

@implementation BottomView



- (void)awakeFromNib{
    _callButton.layer.masksToBounds = YES;
    _callButton.layer.cornerRadius = 2;
    
    _collectButton.layer.masksToBounds = YES;
    _collectButton.layer.cornerRadius = 2;
    
    
    
    @weakify(self);
    [[_collectButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
        @strongify(self);
        if ([self.delegate respondsToSelector:@selector(collectUser:)]) {
            [self.delegate collectUser:_username];
            
        }
    }];
    
    [[_callButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
        @strongify(self);
        if ([self.delegate respondsToSelector:@selector(callPhone:)]) {
            [self.delegate callPhone:_phone];
            
        }
    }];
    

}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
